package com.zoweunion.mechanic.service.impl;

import com.google.common.collect.Lists;
import org.apache.poi.ss.usermodel.CellStyle;
import org.apache.poi.ss.usermodel.Row;
import org.apache.poi.ss.usermodel.Sheet;
import org.apache.poi.ss.usermodel.Workbook;
import org.apache.poi.ss.util.CellUtil;
import org.springframework.stereotype.Service;

import java.io.File;
import java.lang.reflect.InvocationTargetException;
import java.util.*;

import org.springframework.stereotype.Service;

import java.util.Map;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

import org.springframework.beans.factory.annotation.Autowired;
import org.apache.commons.lang3.StringUtils;
import org.apache.poi.xssf.streaming.SXSSFWorkbook;
import org.apache.commons.beanutils.BeanUtils;


import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;

import com.zoweunion.mechanic.dao.TSBrOrderDetailRepairmanMapper;
import com.zoweunion.mechanic.entity.TSBrOrderDetailRepairmanEntity;
import com.zoweunion.mechanic.service.ITSBrOrderDetailRepairmanService;
import com.zoweunion.mechanic.entity.dto.TSBrOrderDetailRepairmanDTO;
import com.zoweunion.mechanic.entity.vo.TSBrOrderDetailRepairmanVO;

import java.util.List;

import org.springframework.transaction.annotation.Transactional;

@Service
@Transactional
public class TSBrOrderDetailRepairmanServiceImpl extends ServiceImpl<TSBrOrderDetailRepairmanMapper, TSBrOrderDetailRepairmanEntity> implements ITSBrOrderDetailRepairmanService {

    @Autowired
    private TSBrOrderDetailRepairmanMapper tSBrOrderDetailRepairmanMapper;


    @Override
    public PageInfo listPage(Map<String, Object> map) {

        Integer pageSize = Integer.valueOf(map.get("pageSize").toString());
        Integer currentPage = Integer.valueOf(map.get("currentPage").toString());
        PageHelper.startPage(currentPage, pageSize);

        List<TSBrOrderDetailRepairmanVO> mapList = tSBrOrderDetailRepairmanMapper.findByCondition(map);
        PageInfo<TSBrOrderDetailRepairmanVO> mapPageInfo = new PageInfo<>(mapList);
        return mapPageInfo;
    }



}

